package cn.thornbird.orgsync.model;

import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

@Getter
@Setter
public class Column {

    private String key;

    private String title;

    private int width = 0;

    private HorizontalAlignment horizontalAlignment = HorizontalAlignment.LEFT;

    private VerticalAlignment verticalAlignment = VerticalAlignment.CENTER;

    private boolean wrapText = false;

    private String format = null;

    public Column(String key, String title) {
        this.key = key;
        this.title = title;
    }

    public Column(String key, String title, int width) {
        this(key, title);
        this.width = width;
    }

    public Column(String key, String title, int width, HorizontalAlignment horizontalAlignment) {
        this(key, title, width);
        this.horizontalAlignment = horizontalAlignment;
    }

    public Column(String key, String title, int width, HorizontalAlignment horizontalAlignment,
                  VerticalAlignment verticalAlignment) {
        this(key, title, width, horizontalAlignment);
        this.verticalAlignment = verticalAlignment;
    }

    public Column(String key, String title, int width, HorizontalAlignment horizontalAlignment,
                  VerticalAlignment verticalAlignment, boolean wrapText) {
        this(key, title, width, horizontalAlignment, verticalAlignment);
        this.wrapText = wrapText;
    }

    public Column(String key, String title, int width, HorizontalAlignment horizontalAlignment,
                  VerticalAlignment verticalAlignment, boolean wrapText, String format) {
        this(key, title, width, horizontalAlignment, verticalAlignment, wrapText);
        this.format = format;
    }

    public Column(String key, String title, int width, String format) {
        this(key, title, width);
        this.format = format;
    }

    public Column(String key, String title, int width, String format,
                  HorizontalAlignment horizontalAlignment) {
        this(key, title, width, format);
        this.horizontalAlignment = horizontalAlignment;
    }

}
